home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / lblcs.arc / CRT_GOTO.ASM < prev    next >
Assembly Source File  |  1985-04-03  |  1KB  |  64 lines

  1.  
  2. ;--------------------------------------------------------------------------
  3. ;
  4. ; name        crt_gotoxy -- cursor set
  5. ;
  6. ; synopsis    VOID    crt_gotoxy(row, col, page)
  7. ;            int row;
  8. ;            int col;
  9. ;            int page;
  10. ;
  11. ; description    This function does a cursor position set to 
  12. ;        row, col on the specified page.  (0-7 in 40
  13. ;        column mode; 0-3 in 80 column mode)  It does
  14. ;        not, however actually change the current text
  15. ;        page. (See crt_setpage function)
  16. ;
  17. ;-------------------------------------------------------------------------
  18.  
  19.     include    dos.mac
  20.  
  21. video    equ    10h        ; video interrupt number
  22.  
  23.  
  24.     IF    LPROG
  25. X    EQU    6        ;OFFSET OF ARGUMENTS
  26.     ELSE
  27. X    EQU    4        ;OFFSET OF ARGUMENTS
  28.     ENDIF
  29.  
  30.     PSEG
  31.  
  32.  
  33.     PUBLIC    crt_gotoxy
  34.  
  35.     IF    LPROG
  36. crt_gotoxy    PROC    FAR
  37.     ELSE
  38. crt_gotoxy    PROC    NEAR
  39.     ENDIF
  40.  
  41.  
  42.     push    bp        ;SAVE BP
  43.     mov    bp,sp
  44.  
  45.     mov    ah,2            ; set cursor position function
  46.     mov    dh,[BP + X ]        ; get row     (get byte out of int)
  47.     mov    dl,[bp + x + 2]        ; get column  (get byte out of int)
  48.     mov    bh,[bp + x + 4]        ; get page #  (get byte out of int)
  49.     int    video            ; video BIOS functions
  50.  
  51.     POP    BP
  52.     RET
  53.  
  54. crt_gotoxy    ENDP
  55.  
  56.  
  57.     ENDPS    
  58.     END
  59.  
  60.  
  61.  
  62.  
  63.  
  64.